! /***********************************************************************
! *                                                                      *
! *   WMPI - Windows Message Passing Interface                           *
! *   http://dsg.dei.uc.pt/wmpi                                          *
! *                                                                      *
! *   (C) 1999 by Dependable Systems Group                               *
! *   CISUC - Centre of Informatics and Systems Research                 *
! *   Department of Informatics Engineering                              *
! *   University of Coimbra - Portugal                                   *
! *                                                                      *
! *   This is an MPI implementation for MS Windows                       *
! *   It is based on the MPICH implementation from Argonne               *
! *   National Laboratory and Mississippi State University,              *
! *   version 1.1.2.                                                     *
! *                                                                      *
! ***********************************************************************/

      INTERFACE MPI_SEND
      SUBROUTINE MPI_SEND_C(BUF, COUNT, DATATYPE, DEST, TAG,
     &    COMM, IERROR) 
        CHARACTER*(*), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_C

      SUBROUTINE MPI_SEND_L1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(1), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_L1
	
      SUBROUTINE MPI_SEND_L2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(2), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_L2
	
      SUBROUTINE MPI_SEND_L4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(4), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_L8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(8), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_L8
$ENDIF

      SUBROUTINE MPI_SEND_I1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(1), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_I1

      SUBROUTINE MPI_SEND_I2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(2), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_I2

      SUBROUTINE MPI_SEND_I4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(4), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_I8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(8), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_I8
$ENDIF

      SUBROUTINE MPI_SEND_R4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(4), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_R4

      SUBROUTINE MPI_SEND_R8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(8), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_SEND_R16(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
         REAL(16), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_R16
$ENDIF

      SUBROUTINE MPI_SEND_X4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(4), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_X4

      SUBROUTINE MPI_SEND_X8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(8), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_X8

      SUBROUTINE MPI_SEND_D1_L1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(1), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_L1
	
      SUBROUTINE MPI_SEND_D1_L2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(2), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_L2
	
      SUBROUTINE MPI_SEND_D1_L4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(4), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_D1_L8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(8), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_L8
$ENDIF

      SUBROUTINE MPI_SEND_D1_I1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(1), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_I1

      SUBROUTINE MPI_SEND_D1_I2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(2), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_I2

      SUBROUTINE MPI_SEND_D1_I4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(4), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_D1_I8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(8), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_I8
$ENDIF

      SUBROUTINE MPI_SEND_D1_R4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(4), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_R4

      SUBROUTINE MPI_SEND_D1_R8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(8), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_SEND_D1_R16(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
         REAL(16), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_R16
$ENDIF

      SUBROUTINE MPI_SEND_D1_X4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(4), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_X4

      SUBROUTINE MPI_SEND_D1_X8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(8), DIMENSION(:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D1_X8

      SUBROUTINE MPI_SEND_D2_L1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(1), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_L1
	
      SUBROUTINE MPI_SEND_D2_L2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(2), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_L2
	
      SUBROUTINE MPI_SEND_D2_L4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(4), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_D2_L8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(8), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_L8
$ENDIF

      SUBROUTINE MPI_SEND_D2_I1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(1), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_I1

      SUBROUTINE MPI_SEND_D2_I2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(2), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_I2

      SUBROUTINE MPI_SEND_D2_I4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(4), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_D2_I8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(8), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_I8
$ENDIF

      SUBROUTINE MPI_SEND_D2_R4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(4), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_R4

      SUBROUTINE MPI_SEND_D2_R8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(8), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_SEND_D2_R16(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
         REAL(16), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_R16
$ENDIF

      SUBROUTINE MPI_SEND_D2_X4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(4), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_X4

      SUBROUTINE MPI_SEND_D2_X8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(8), DIMENSION(:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D2_X8

      SUBROUTINE MPI_SEND_D3_L1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(1), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_L1
	
      SUBROUTINE MPI_SEND_D3_L2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(2), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_L2
	
      SUBROUTINE MPI_SEND_D3_L4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(4), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_D3_L8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       LOGICAL(8), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_L8
$ENDIF

      SUBROUTINE MPI_SEND_D3_I1(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(1), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_I1

      SUBROUTINE MPI_SEND_D3_I2(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(2), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_I2

      SUBROUTINE MPI_SEND_D3_I4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(4), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_SEND_D3_I8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       INTEGER(8), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_I8
$ENDIF

      SUBROUTINE MPI_SEND_D3_R4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(4), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_R4

      SUBROUTINE MPI_SEND_D3_R8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
          REAL(8), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_SEND_D3_R16(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
         REAL(16), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_R16
$ENDIF

      SUBROUTINE MPI_SEND_D3_X4(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(4), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_X4

      SUBROUTINE MPI_SEND_D3_X8(BUF, COUNT, DATATYPE, DEST, TAG,
     &	COMM, IERROR) 
       COMPLEX(8), DIMENSION(:,:,:), INTENT(IN)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: DEST
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_SEND_D3_X8
      END INTERFACE MPI_SEND

      INTERFACE MPI_RECV
      SUBROUTINE MPI_RECV_C(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &    COMM, STATUS, IERROR) 
        CHARACTER*(*), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_C

      SUBROUTINE MPI_RECV_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_L1
	
      SUBROUTINE MPI_RECV_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_L2
	
      SUBROUTINE MPI_RECV_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_L8
$ENDIF

      SUBROUTINE MPI_RECV_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_I1

      SUBROUTINE MPI_RECV_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_I2

      SUBROUTINE MPI_RECV_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_I8
$ENDIF

      SUBROUTINE MPI_RECV_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_R4

      SUBROUTINE MPI_RECV_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_R16
$ENDIF

      SUBROUTINE MPI_RECV_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_X4

      SUBROUTINE MPI_RECV_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_X8

      SUBROUTINE MPI_RECV_D1_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_L1
	
      SUBROUTINE MPI_RECV_D1_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_L2
	
      SUBROUTINE MPI_RECV_D1_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_D1_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_L8
$ENDIF

      SUBROUTINE MPI_RECV_D1_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_I1

      SUBROUTINE MPI_RECV_D1_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_I2

      SUBROUTINE MPI_RECV_D1_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_D1_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_I8
$ENDIF

      SUBROUTINE MPI_RECV_D1_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_R4

      SUBROUTINE MPI_RECV_D1_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_D1_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_R16
$ENDIF

      SUBROUTINE MPI_RECV_D1_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_X4

      SUBROUTINE MPI_RECV_D1_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D1_X8

      SUBROUTINE MPI_RECV_D2_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_L1
	
      SUBROUTINE MPI_RECV_D2_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_L2
	
      SUBROUTINE MPI_RECV_D2_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_D2_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_L8
$ENDIF

      SUBROUTINE MPI_RECV_D2_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_I1

      SUBROUTINE MPI_RECV_D2_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_I2

      SUBROUTINE MPI_RECV_D2_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_D2_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_I8
$ENDIF

      SUBROUTINE MPI_RECV_D2_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_R4

      SUBROUTINE MPI_RECV_D2_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_D2_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_R16
$ENDIF

      SUBROUTINE MPI_RECV_D2_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_X4

      SUBROUTINE MPI_RECV_D2_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D2_X8

      SUBROUTINE MPI_RECV_D3_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_L1
	
      SUBROUTINE MPI_RECV_D3_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_L2
	
      SUBROUTINE MPI_RECV_D3_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_D3_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_L8
$ENDIF

      SUBROUTINE MPI_RECV_D3_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_I1

      SUBROUTINE MPI_RECV_D3_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_I2

      SUBROUTINE MPI_RECV_D3_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_D3_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_I8
$ENDIF

      SUBROUTINE MPI_RECV_D3_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_R4

      SUBROUTINE MPI_RECV_D3_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_D3_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_R16
$ENDIF

      SUBROUTINE MPI_RECV_D3_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_X4

      SUBROUTINE MPI_RECV_D3_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_D3_X8

      SUBROUTINE MPI_RECV_S_C(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &    COMM, STATUS, IERROR) 
        CHARACTER*(*), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_C

      SUBROUTINE MPI_RECV_S_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_L1
	
      SUBROUTINE MPI_RECV_S_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_L2
	
      SUBROUTINE MPI_RECV_S_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_L8
$ENDIF

      SUBROUTINE MPI_RECV_S_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_I1

      SUBROUTINE MPI_RECV_S_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_I2

      SUBROUTINE MPI_RECV_S_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_I8
$ENDIF

      SUBROUTINE MPI_RECV_S_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_R4

      SUBROUTINE MPI_RECV_S_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_S_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_R16
$ENDIF

      SUBROUTINE MPI_RECV_S_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_X4

      SUBROUTINE MPI_RECV_S_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_X8

      SUBROUTINE MPI_RECV_S_D1_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_L1
	
      SUBROUTINE MPI_RECV_S_D1_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_L2
	
      SUBROUTINE MPI_RECV_S_D1_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_D1_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_L8
$ENDIF

      SUBROUTINE MPI_RECV_S_D1_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_I1

      SUBROUTINE MPI_RECV_S_D1_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_I2

      SUBROUTINE MPI_RECV_S_D1_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_D1_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_I8
$ENDIF

      SUBROUTINE MPI_RECV_S_D1_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_R4

      SUBROUTINE MPI_RECV_S_D1_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_S_D1_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_R16
$ENDIF

      SUBROUTINE MPI_RECV_S_D1_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_X4

      SUBROUTINE MPI_RECV_S_D1_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), DIMENSION(:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D1_X8

      SUBROUTINE MPI_RECV_S_D2_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_L1
	
      SUBROUTINE MPI_RECV_S_D2_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_L2
	
      SUBROUTINE MPI_RECV_S_D2_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_D2_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_L8
$ENDIF

      SUBROUTINE MPI_RECV_S_D2_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_I1

      SUBROUTINE MPI_RECV_S_D2_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_I2

      SUBROUTINE MPI_RECV_S_D2_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_D2_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_I8
$ENDIF

      SUBROUTINE MPI_RECV_S_D2_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_R4

      SUBROUTINE MPI_RECV_S_D2_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_S_D2_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_R16
$ENDIF

      SUBROUTINE MPI_RECV_S_D2_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_X4

      SUBROUTINE MPI_RECV_S_D2_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), DIMENSION(:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D2_X8

      SUBROUTINE MPI_RECV_S_D3_L1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(1), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_L1
	
      SUBROUTINE MPI_RECV_S_D3_L2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(2), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_L2
	
      SUBROUTINE MPI_RECV_S_D3_L4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_L4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_D3_L8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       LOGICAL(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_L8
$ENDIF

      SUBROUTINE MPI_RECV_S_D3_I1(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(1), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_I1

      SUBROUTINE MPI_RECV_S_D3_I2(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(2), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_I2

      SUBROUTINE MPI_RECV_S_D3_I4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_I4

$IF DEFINED(_ALPHA_)
      SUBROUTINE MPI_RECV_S_D3_I8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       INTEGER(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_I8
$ENDIF

      SUBROUTINE MPI_RECV_S_D3_R4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_R4

      SUBROUTINE MPI_RECV_S_D3_R8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
          REAL(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_R8

$IF DEFINED(_VMS_)
      SUBROUTINE MPI_RECV_S_D3_R16(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
         REAL(16), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_R16
$ENDIF

      SUBROUTINE MPI_RECV_S_D3_X4(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(4), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_X4

      SUBROUTINE MPI_RECV_S_D3_X8(BUF, COUNT, DATATYPE, SOURCE, TAG,
     &	COMM, STATUS, IERROR) 
       COMPLEX(8), DIMENSION(:,:,:), INTENT(OUT)  :: BUF
          INTEGER, INTENT(IN)  :: COUNT
          INTEGER, INTENT(IN)  :: DATATYPE
          INTEGER, INTENT(IN)  :: SOURCE
          INTEGER, INTENT(IN)  :: TAG
          INTEGER, INTENT(IN)  :: COMM
          INTEGER, DIMENSION(:), INTENT(OUT) :: STATUS 
          INTEGER, INTENT(OUT) :: IERROR 

      END SUBROUTINE  MPI_RECV_S_D3_X8
      END INTERFACE MPI_RECV
